package com.example.springsecuritydemo.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName: HelloController
 * @Descripiton: TODO
 * @Author: 小郑
 * @Date： 2023/10/28 19:18
 * @Version：1.8
 **/
@RestController
public class HelloController {
    @RequestMapping("/hello")
    //访问资源之间进行授权认证
    @PreAuthorize("hasAuthority('system:dept:list')")
    public String hello(){
        return "hello";
    }
}